package one.stand.enums;
/**
 * @author Administrator
 */
public enum  WxNoticeEnums {

    /**
     * 订单支付成功通知
     */
    ORDER_PAY_SUCCESS(1,"AT0009","订单支付成功通知","USER","pages/orderLists/main?goType=1",9,10,7,6),

    /**
     * 订单支付失败通知
     */
    ORDER_PAY_FAIL(2,"AT0010","订单支付失败通知","USER","pages/orderLists/main?goType=1",18,19,23,21,1),

    /**
     * 订单发货提醒
     */
    ORDER_ARRIVE(3,"AT0007","订单发货提醒","USER","pages/orderLists/main?goType=1",20,55,96,3,66),

    /**
     * 退款成功通知
     */
    REFUND_SUCCESS(4,"AT0787","退款成功通知","USER","pages/orderLists/main?goType=1",26,14,17,15),

    /**
     * 退款失败通知
     */
    REFUND_FAIL(5,"AT0329","退款失败通知","USER","pages/orderLists/main?goType=1",1,2,3,4),

    /**
     * 订单发货提醒
     */
    ORDER_DELIVER (6,"AT0007","订单发货提醒","CRM","pages/orderLists/main?goType=1",20,55,96,3,66),

    /**
     * 订单取消通知
     */
    ORDER_CANCEL (7,"AT0024","订单取消通知","CRM","pages/orderLists/main?goType=1",5,24,4,3),

    /**
     * 退货申请通知
     */
    REFUND_APPLY (8,"AT0313","退货申请通知","CRM","pages/orderLists/main?goType=1",3,6,8,12,16),

    /**
     * 新订单通知
     */
    NEW_ORDER (9,"AT0079","新订单通知","CRM","pages/orderLists/main?goType=1",6,9,37,36,31),

    /**
     * 评论回复通知（咨询回复通知）
     */
    COMMENT_REPLY (10,"AT2039","咨询回复通知","CRM","pages/articleDetail/main?goType=1",6,4,5),

    /**
     * 未读消息提醒（未读回信提醒）
     */
    UNREAD_MESSAGE(11,"AT0793","未读回信提醒","CRM","pages/msg/main?goType=1",5,6,7),

    /**
     * 客户来访提醒
     */
    CUSTOMER_ACCESS(12,"AT1442","客户来访提醒","CRM","pages/index/main",4,1,12),

    /**
     * 订单状态通知
     */
    ORDER_STATE_CRM(13,"AT0202","订单状态通知","CRM","pages/orderLists/main?goType=1",5,44,3,4),

    /**
     * 评论回复（咨询回复通知）
     */
    COMMENT_REPLY_USER(14,"AT2039","咨询回复通知","USER","pages/Dynamic/main?goType=1",6,4,5),

    /**
     * 未读消息（未读回信提醒）
     */
    UNREAD_MESSAGE_USER(15,"AT0793","未读回信提醒","USER","pages/msg/main?goType=1",5,6,7),

    /**
     * 订单状态通知
     */
    ORDER_STATE_USER(16,"AT0202","订单状态通知","USER","pages/orderLists/main?goType=1",5,44,3,4),

    /**
     * 需求提交成功提醒
     */
    FROM_SUBMIT(17,"AT1185","需求提交成功提醒","CRM","pages/webSiteMsg/main?goType=1",2,4,1);


    private Integer code;

    private String name;

    private String type;

    private String page;

    private String noticeId;

    private Integer[] data;

    public Integer getCode(){
        return code;
    }

    public void setCode(Integer code){
        this.code = code;
    }

    public String getName(){
        return name;
    }

    public void setName(String name){
        this.name = name;
    }

    public String getType(){
        return type;
    }

    public void setType(String type){
        this.type = type;
    }

    public String getPage(){
        return page;
    }

    public void setPage(String page){
        this.page = page;
    }

    public String getNoticeId() {
        return noticeId;
    }

    public void setNoticeId(String noticeId) {
        this.noticeId = noticeId;
    }

    public Integer[] getData(){
        return data;
    }

    public void setData(Integer[] data){
        this.data = data;
    }

    WxNoticeEnums(Integer code, String noticeId, String name, String type, String page, Integer...data){
        this.code = code;
        this.noticeId = noticeId;
        this.name = name;
        this.type = type;
        this.page = page;
        this.data = data;
    }

    public static String getPage(Integer code) {
        WxNoticeEnums[] wxNoticeEnums = values();
        for (WxNoticeEnums wxNoticeEnums1 : wxNoticeEnums) {
            if (wxNoticeEnums1.getCode().equals(code)) {
                return wxNoticeEnums1.getPage();
            }
        }
        return null;
    }

    public static String getType(Integer code) {
        WxNoticeEnums[] wxNoticeEnums = values();
        for (WxNoticeEnums wxNoticeEnums1 : wxNoticeEnums) {
            if (wxNoticeEnums1.getCode().equals(code)) {
                return wxNoticeEnums1.getType();
            }
        }
        return null;
    }
}
